# Contributor: Thomas Kienlen <kommander@laposte.net>
# Maintainer: Thomas Kienlen <kommander@laposte.net>
pkgname=supercronic
pkgver=0.2.1
pkgrel=0
pkgdesc="Cron for containers"
url="https://github.com/aptible/supercronic"
arch="all"
license="MIT"
makedepends="go"
checkdepends="python3"
source="supercronic-$pkgver.tar.gz::https://github.com/aptible/supercronic/archive/refs/tags/v$pkgver.tar.gz
	python3.patch
	"
options="chmod-clean"

build() {
	go build -trimpath
}

check() {
	# make unit (without -race option, -buildmode=pie not supported when -race is enabled)
	go test -v ./...
}

package() {
	install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
}

sha512sums="
dbd2eb69fd5af105ba1eaf677f9c4ab2b5c3bcf0f60fa68993c228c7946964e066b8d345795076d9adb1d85584cd301435b4f131baa5f9977ecae49f1188d9d0  supercronic-0.2.1.tar.gz
fd88eccd0a18d65af57292e430a1c69b2de1d5c845522e1e1b8b217ab11b8d974543da747debbd6cd2c03d0929dcc04c028a0dc95fc27433331a0dec61d1dfae  python3.patch
"
